Response
Relación de request con response:
GlobalDocumentId | CountryDocumentId | Status | Respuesta tipo | Mensaje respuesta |
---|---|---|---|---|
string | string | error | "Messages": [ “Parámetro status no debe ser vacío” ], | |
string | string | distinto 3 caracteres | error | "Messages": [ “Solo se puede consultar 1 evento de 3 caracteres, ejemplo 030” ], |
null | null | NNN | error | "Messages": [ "Debe informar globalDocumentId o countryDocumentId" ], |
string | string | all | ok | "Messages": [ “<cac:DocumentResponse/", “<cac:DocumentResponse/" … , "ResponseValue": "Xml ApplicationResponse Base64Bytes" |
string | null | NNN | ok | Entrega información de evento consultado. "Messages": [“<cac:DocumentResponse>/", <cac:DocumentResponse>/" … ], "ResponseValue": "Xml ApplicationResponse Base64Bytes" Si evento no existe, retornará "Messages": [ "Sin evento [código] registrado" ], |
null | string | NNN | ok | Entrega información de evento consultado. "Messages": [“<cac:DocumentResponse>/", <cac:DocumentResponse>/" … ], "ResponseValue": "Xml ApplicationResponse Base64Bytes" Si evento no existe, retornará "Messages": [ "Sin evento [código] registrado" ], |
string | string | NNN | ok | Entrega información de evento consultado. "Messages": [“<cac:DocumentResponse>/", <cac:DocumentResponse>/" … ], "ResponseValue": "Xml ApplicationResponse Base64Bytes" Si evento no existe, retornará "Messages": [ "Sin evento [código] registrado" ], |
Definición de los campos que hacen parte del response:
{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "CUDE del ApplicationResponse",
"OtherData": {
"Country": "co",
"Certifier": "DIAN",
"AuthorityTimeStamp": "Fecha y hora del ApplicationResponse, formato DD/MM/AAAA HH:mm:ss”
},
"Messages": [
"<cac:DocumentResponse…",
"<cac:DocumentResponse…"
],
"ResponseValue": "ApplicationResponse en base64",
"Code": "código respuesta DIAN ",
"Description": " Procesado Correctamente.",
"ErrorException": null
}
Dentro de "Messages" se entregará XML con la información del/los eventos consultados
<cac:DocumentResponse xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\">
<!-- INFORMACIÓN DEL EVENTO -->
<cac:Response>
...
</cac:Response>
<!-- IDENTIFICACIÓN DEL EVENTO -->
<cac:DocumentReference>
...
</cac:DocumentReference>
<!-- EMISOR DEL EVENTO -->
<cac:IssuerParty>
...
</cac:IssuerParty>
<!-- RECEPTOR DEL EVENTO
EN CASO DE LOS ENDODOS Y TRANSFERENCIA DE LOS DERECHOS ECONÓMICOS, CORRESPONDE AL NUEVO TENEDOR-->
<cac:RecipientParty>
...
</cac:RecipientParty>
<!-- CÓDIGO Y DESCRIPCIÓN RESPUESTA DIAN -->
<cac:LineResponse>
<cac:LineReference>
...
<cac:Response>
...
</cac:Response>
</cac:LineResponse>
</cac:DocumentResponse>
Ejemplos de respuestas:
- all
- 037
- Status <> 3 caracteres
{
"Success": true,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": "ce0966825a7d2e7fa7bf8db3c9f660397acfb6f57e142ef35d15793f0ae8e4284092dbcec78eccc1ad46b9657bb5dfa7",
"OtherData": {
"Country": "co",
"Certifier": "DIAN",
"AuthorityTimeStamp": "08/08/2022 15:59:51"
},
"Messages": [
"<cac:DocumentResponse xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\">
<cac:Response>
<cbc:ReferenceID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">1</cbc:ReferenceID>
<cbc:ResponseCode xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">030</cbc:ResponseCode>
…
</cac:DocumentResponse>",
"<cac:DocumentResponse xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\">
<cac:Response>
<cbc:ReferenceID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">2</cbc:ReferenceID>
<cbc:ResponseCode xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">032</cbc:ResponseCode>
…
</cac:DocumentResponse>",
…
],
"ResponseValue": "PD94bWwgdmVyc2+",
"Code": "00",
"Description": "Procesado Correctamente.",
"ErrorException": null
}
{
"Success": true,
"GlobalDocumentId": "3dafb03e-125a-aeb9-862c-0007d7d013ca",
"CountryDocumentId": "38385ebe9e01d24d1bf84c1bca5dd851d7d6562b419f7ed07cf8a6064d14ff7ace0c3467ee3009561b136956d7b13394",
"OtherData": {
"Country": "co",
"Certifier": "DIAN",
"AuthorityTimeStamp": "21/03/2023 18:43:46"
},
"Messages": [
"<cac:DocumentResponse xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\">
<cac:Response>
<cbc:ReferenceID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">5</cbc:ReferenceID>
<cbc:ResponseCode xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">037</cbc:ResponseCode>
<cbc:Description xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">Endoso con responsabilidad del endosante</cbc:Description>
<cbc:EffectiveDate xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">2023-03-21</cbc:EffectiveDate>
<cbc:EffectiveTime xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">13:43:46-05:00</cbc:EffectiveTime>
</cac:Response>
<cac:DocumentReference>
<cbc:ID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">9738495673</cbc:ID>
<cbc:UUID schemeName=\"CUDE-SHA384\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">512322995df839c4770e47d7e7ff834652fa09afac9c0db0430a3b82272de48a148aa92acc285d7c572ea80b497ad346</cbc:UUID>
</cac:DocumentReference>
<cac:IssuerParty>
<cac:PartyTaxScheme>
<cbc:RegistrationName xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">Signature South Consulting</cbc:RegistrationName>
<cbc:CompanyID schemeID=\"9\" schemeName=\"31\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">900508908</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">01</cbc:ID>
<cbc:Name xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">IVA</cbc:Name>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</cac:IssuerParty>
<cac:RecipientParty>
<cac:PartyTaxScheme>
<cbc:RegistrationName xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">Éxito Viajes y Turismo</cbc:RegistrationName>
<cbc:CompanyID schemeID=\"6\" schemeName=\"31\" xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">900640173</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">01</cbc:ID>
<cbc:Name xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">IVA</cbc:Name>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</cac:RecipientParty>
<cac:LineResponse>
<cac:LineReference>
<cbc:LineID xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">1</cbc:LineID>
</cac:LineReference>
<cac:Response>
<cbc:ResponseCode xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\">AAI07b</cbc:ResponseCode>
<cbc:Description xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\" />
</cac:Response>
</cac:LineResponse>
</cac:DocumentResponse>"
],
"ResponseValue": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiIHN0YW5kYWxvbmU9Im5vIj8,
"Code": "00",
"Description": "Procesado Correctamente.",
"ErrorException": null
}
{
"Success": false,
"GlobalDocumentId": "00000000-0000-0000-0000-000000000000",
"CountryDocumentId": null,
"OtherData": null,
"Messages": null,
"ResponseValue": null,
"Code": "401",
"Description": "solo se puede consultar 1 evento de 3 caracteres, ejemplo 030",
"ErrorException": null
}